<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>菜单栏案例</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .box{
            width: 300px;
            margin:0 auto;
        }
        ul{
            list-style: none;
        }
        /* 父>子=class */
        .box>li{
            width: 149px;
            line-height: 40px;
            text-align: center;
            background-color: rgb(114, 72, 17);
            color: white;
            border: 0.5px solid rgb(35, 82, 35);
            float:left;
        }
        li ul{
            display: none;
            background: rgb(255, 255, 255);
            color: black;
            /* height: 30px;
            overflow: auto; */
        }
        .box li:hover{
            background-color: antiquewhite;
            color: rgb(165, 7, 7);
        }
        li:hover ul{
            display: block;
        }
        .box>li ul>li:hover{
            background-color: rgb(247, 239, 104);
            color: rgb(7, 7, 7);
        }
    </style>
</head>
<body>
    <ul class="box">
        <li>视频教程
            <ul>
                <li>c++</li>
                <li>python</li>
                <li>java</li>
                <li>c语言</li>
                <li>大数据</li>
                <li>go语言</li>
            </ul>
        </li>
        <li>考试认证
            <ul>
                <li>软件工程师</li>
                <li>审计师</li>
                <li>软件测试</li>
            </ul>
        </li>
    </ul>
</body>
</html>